﻿using RXY_Mall.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RXY_Mall.AdminApi.Models
{

    #region 消息
    /// <summary>
    /// 消息通知输出信息
    /// </summary>
    public class GetMessagesOutput
    {
        /// <summary>
        /// 添加时间
        /// </summary>
        internal DateTime add_time { get; set; }
        /// <summary>
        /// 消息ID
        /// </summary>
        public int message_id { get; set; }
        /// <summary>
        /// 消息类型
        /// </summary>
        public MessageType message_type { get; set; }
        /// <summary>
        /// 消息标题
        /// </summary>
        public string title { get; set; }
        /// <summary>
        /// 简述
        /// </summary>
        public string summary { get; set; }
        /// <summary>
        /// 内容
        /// </summary>
        public string content { get; set; }
        /// <summary>
        /// 图片
        /// </summary>
        public string picture_url { get; set; }
        /// <summary>
        /// 时间
        /// </summary>
        public long date { get; set; }

    }

    /// <summary>
    /// 优惠消息
    /// </summary>
    public class DiscountMessage : GetMessagesOutput
    {

        internal gw_marketing_coupon marketing_coupon;

        /// <summary>
        /// 优惠类型
        /// </summary>
        public DiscountType discount_type { get; set; }
        /// <summary>
        /// 优惠券ID
        /// </summary>
        public Nullable<int> coupon_id { get; set; }
        /// <summary>
        /// 跳转链接
        /// </summary>
        public string goto_url { get; set; }
        /// <summary>
        /// 优惠券
        /// </summary>
        public GetCouponOutput coupon { get; set; }
    }

    /// <summary>
    /// 订单消息
    /// </summary>
    public class OrderMessage : GetMessagesOutput
    {
        /// <summary>
        /// 订单号
        /// </summary>
        public string order_no { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStatus order_status { get; set; }
    }

    /// <summary>
    /// 红包
    /// </summary>
    public class RedpacketMessage : GetMessagesOutput
    {
        /// <summary>
        /// 红包类型
        /// </summary>
        public RedpacketType redpacket_type { get; set; }
        /// <summary>
        /// 鼓励金ID
        /// </summary>
        public Nullable<int> redpacket_id { get; set; }
        /// <summary>
        /// 补贴卡ID
        /// </summary>
        public Nullable<int> subsidy_id { get; set; }
        ///// <summary>
        ///// 总期数
        ///// </summary>
        //public int? total_cycle { get; internal set; }
    }

    /// <summary>
    /// 钱包信息
    /// </summary>
    public class WalletMessage : GetMessagesOutput
    {
        /// <summary>
        /// 钱包类型
        /// </summary>
        public WalletType wallet_type { get; set; }
        /// <summary>
        /// 提现ID
        /// </summary>
        public int withdraw_id { get; set; }
    }

    /// <summary>
    /// 钱包信息
    /// </summary>
    public class MessageCount
    {
        /// <summary>
        /// 钱包通知数量
        /// </summary>
        public int wallet_count { get; set; }
        /// <summary>
        /// 订单通知数量
        /// </summary>
        public int order_count { get; set; }
        /// <summary>
        /// 优惠通知数量
        /// </summary>
        public int discount_count { get; set; }
        /// <summary>
        /// 红包通知数量
        /// </summary>
        public int redpacket_count { get; set; }
    }

    /// <summary>
    /// 送达统计
    /// </summary>
    public class JPushReport
    {
        /// <summary>
        /// Android 送达,如果无此项数据则为 null。
        /// </summary>
        public int android_received { get; set; }
        /// <summary>
        /// 通知推送到 APNs 成功,如果无此项数据则为 null。
        /// </summary>
        public string ios_apns_received { get; set; }
        /// <summary>
        /// iOS 通知送达到设备,如果无此项数据则为 null。
        /// </summary>
        public int ios_apns_sent { get; set; }
        /// <summary>
        /// iOS 自定义消息送达数。如果无此项数据则为 null。
        /// </summary>
        public string ios_msg_received { get; set; }
        /// <summary>
        /// msg_ids
        /// </summary>
        public string msg_id { get; set; }
        /// <summary>
        /// winphone通知送达。如果无此项数据则为 null
        /// </summary>
        public string wp_mpns_sent { get; set; }
    }

    #endregion


    #region 消息
    /// <summary>
    /// 消息通知输出信息
    /// </summary>
    public class NoticeOutput
    {
        /// <summary>
        /// 通知ID
        /// </summary>
        public int notice_id { get; set; }
        /// <summary>
        /// 通知
        /// </summary>
        public string notice { get; set; }
        /// <summary>
        /// 添加时间
        /// </summary>
        internal DateTime _add_time { get; set; }
        /// <summary>
        /// 跳转链接
        /// </summary>
        public string url { get; set; }
        /// <summary>
        /// 是否阅读
        /// </summary>
        public bool is_look { get; set; }
        /// <summary>
        /// 是否弹框
        /// </summary>
        public bool is_popout { get; set; }
    }

    /// <summary>
    /// 消息通知输入信息
    /// </summary>
    public class NoticeInput : BaseInput
    {
        /// <summary>
        /// 消息ID
        /// </summary>
        public int notice_id { get; set; }
    }
    #endregion


}